package com.hdax.dm.controller;

import com.hdax.dm.dto.getScheduleDto;
import com.hdax.dm.service.DmSchedulerSeatService;
import com.hdax.dm.service.DmSchedulerService;
import com.hdax.dm.utils.response.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/scheduler")
public class GetScheduleController {

    @Autowired
    private DmSchedulerService getTimePlanService;

    @Autowired
    private DmSchedulerSeatService getScheduleService;


    /**
     * 获取座位信息api_chooseSeat.getSchedule
     */
    @PostMapping("choose/seat/getSeatList")
    public CommonResponse<Map<String, List<String>>> getSeatList(@RequestBody Map<String,Integer> params){
        return getScheduleService.getSeatList(params);
    }

    /**
     * 获取座位状态等信息
     */
    @PostMapping("choose/p/seat/getSchedule")
    public CommonResponse<getScheduleDto> getSchedule(@RequestBody Map<String,Integer> params){
        return getTimePlanService.getSchedule(params);
    }

}
